package beer.coder.walawala.gui.util;

import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;

/**
 * TODO
 *
 * @author amath0312
 * @version 1.0
 * @date 2019-10-26 22:59
 */
public class ProcessUtil {
  public static int currentProcessId(){
    RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();
    return Integer.valueOf(runtimeMXBean.getName().split("@")[0])
        .intValue();
  }
}
